<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# OPTIONS_GHC -fno-warn-deprecations #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE ConstraintKinds #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Utils.Exception</span><span>
</span><span id="line-5"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-6"></span><span>    </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>    </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="GHC.Utils.Exception.html"><span class="hs-identifier">GHC.Utils.Exception</span></a></span><span>
</span><span id="line-8"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">CE</span></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#"><span class="hs-identifier">Control.Monad.IO.Class</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#"><span class="hs-identifier">Control.Monad.Catch</span></a></span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-comment">-- Monomorphised versions of exception-handling utilities</span><span>
</span><span id="line-19"></span><span id="local-6989586621680777286"><span class="annot"><a href="GHC.Utils.Exception.html#catchIO"><span class="hs-identifier hs-type">catchIO</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621680777286"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">IOException</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621680777286"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621680777286"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-20"></span><span id="catchIO"><span class="annot"><span class="annottext">catchIO :: forall a. IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
</span><a href="GHC.Utils.Exception.html#catchIO"><span class="hs-identifier hs-var hs-var">catchIO</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
forall e a. Exception e =&gt; IO a -&gt; (e -&gt; IO a) -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#catch"><span class="hs-identifier hs-var">CE.catch</span></a></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span id="local-6989586621680777280"><span class="annot"><a href="GHC.Utils.Exception.html#handleIO"><span class="hs-identifier hs-type">handleIO</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">IOException</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621680777280"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621680777280"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621680777280"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-23"></span><span id="handleIO"><span class="annot"><span class="annottext">handleIO :: forall a. (IOException -&gt; IO a) -&gt; IO a -&gt; IO a
</span><a href="GHC.Utils.Exception.html#handleIO"><span class="hs-identifier hs-var hs-var">handleIO</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IO a -&gt; (IOException -&gt; IO a) -&gt; IO a)
-&gt; (IOException -&gt; IO a) -&gt; IO a -&gt; IO a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
forall a. IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
</span><a href="GHC.Utils.Exception.html#catchIO"><span class="hs-identifier hs-var">catchIO</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span id="local-6989586621680777275"><span class="annot"><a href="GHC.Utils.Exception.html#tryIO"><span class="hs-identifier hs-type">tryIO</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621680777275"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">IOException</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680777275"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-26"></span><span id="tryIO"><span class="annot"><span class="annottext">tryIO :: forall a. IO a -&gt; IO (Either IOException a)
</span><a href="GHC.Utils.Exception.html#tryIO"><span class="hs-identifier hs-var hs-var">tryIO</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; IO (Either IOException a)
forall e a. Exception e =&gt; IO a -&gt; IO (Either e a)
</span><a href="../../base/src/Control.Exception.Base.html#try"><span class="hs-identifier hs-var">CE.try</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-keyword">type</span><span> </span><span id="ExceptionMonad"><span class="annot"><a href="GHC.Utils.Exception.html#ExceptionMonad"><span class="hs-identifier hs-var">ExceptionMonad</span></a></span></span><span> </span><span id="local-6989586621680777261"><span class="annot"><a href="#local-6989586621680777261"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadCatch"><span class="hs-identifier hs-type">MonadCatch</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680777261"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadThrow"><span class="hs-identifier hs-type">MonadThrow</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680777261"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadMask"><span class="hs-identifier hs-type">MonadMask</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680777261"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680777261"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-29"></span></pre></body></html>